<div id="themes">
<? echo $adminMenu->settings(); ?>
<h2><? __('THEMES_ADMIN_TITLE'); ?> (<? echo $html->link(__('THEME_NEW',true),array('action'=>'add')); ?>)</h2>
<? echo $pagination->create(null,'themes'); ?>
<ul>
<? foreach ($themes as $theme): ?>
	<li>
		<h3>
			<? echo $theme['Theme']['name'];?> 
			<? 
				if(!empty($theme['Theme']['author'])) { ?> 
					<?__('FROM'); ?>  
					<? 
					if(!empty($theme['Theme']['homepage'])) {
						echo $html->link($theme['Theme']['author'],$theme['Theme']['homepage'],array('target'=>'new'));
					} else {
						e($theme['Theme']['author']);
					}
				}
			?>
		</h3>
		<div class="theme_detail">
		<? if($theme['Theme']['description']) echo $theme['Theme']['description']; ?>
		<p>
			<? echo ife($theme['Theme']['active'],__('THEME_ACTIVE',true),$html->link(__('ACTIVATE',true),array('action'=>'switchto',$theme['Theme']['id']))); ?>
			<? echo $html->link(__('THEME_EDIT_INFORMATIONS',true),array('action'=>'edit',$theme['Theme']['id'])); ?>
			<? echo $html->link(__('DELETE',true),array('action'=>'delete',$theme['Theme']['id'])); ?>
		</p>
		</div>
		<div class="theme_preview"><? echo $html->image(DS.'themed'.DS.$theme['Theme']['folder'].DS.'img'.DS.'preview.png',array('alt'=>__('THEME_PREVIEW',true))); ?></div>
		<br clear="all" />
	</li>
<? endforeach; ?>
</ul>

<? echo $pagination->create(null,'themes'); ?>
</div>